package com.excilys.model;

import javax.validation.constraints.Min;

import org.hibernate.validator.constraints.Length;

import com.excilys.annotation.TestAnnotation;

public class TransferForm {

	@Length(min = 9, max = 9, message = "The account must be 9 characters long.")
	private String transactionAccount;

	@Length(min = 9, max = 9, message = "The account must be 9 characters long.")
	private String transferAccount;

	@Min(value = 1, message = "The amount must be superior to 1$.")
	@TestAnnotation
	private double transactionAmount;

	public TransferForm() {
	}

	public TransferForm(String transactionAccount, String transferAccount, double transactionAmount) {
		this.transactionAccount = transactionAccount;
		this.transferAccount = transferAccount;
		this.transactionAmount = transactionAmount;
	}

	public String getTransactionAccount() {
		return transactionAccount;
	}

	public void setTransactionAccount(String transactionAccount) {
		this.transactionAccount = transactionAccount;
	}

	public String getTransferAccount() {
		return transferAccount;
	}

	public void setTransferAccount(String transferAccount) {
		this.transferAccount = transferAccount;
	}

	public double getTransactionAmount() {
		return transactionAmount;
	}

	public void setTransactionAmount(double transactionAmount) {
		this.transactionAmount = transactionAmount;
	}

	@Override
	public String toString() {
		return "transactionAccount : " + this.transactionAccount + " / transferAccount : " + this.transferAccount + " / transactionAmount : " + transactionAmount;
	}

}
